<%def name="ganett_chart(plans,title='Tutt+Library+Systems+Projects')">
<img src="http://chart.apis.google.com/chart?cht=bhs&chs=600x200&chd=t:0,3,4,10,11|3,1,0,0,0|0,0,0,0,0|0,0,6,0,0|0,0,0,1,3|0,0,0,0,0&chds=0,14&chco=ffffff00,000000,00ff00,ff0000,0000ff,ff6600&chtt=${title}&chdl=|Complete|On+Time|Late|Upcoming|Other&chxt=x,y&chxl=0:|12%2F04|12%2F05|12%2F06|12%2F07|12%2F08|12%2F09|12%2F10|12%2F11|12%2F12|12%2F13|12%2F14|12%2F15|12%2F16|12%2F17|12%2F18|1:|Step+5|Step+4|Step+3|Step+2|Basic+Solr+Index&chg=7.1,0&chm=r,99ccff44,0,0,0.29" />
</%def>

<%def name="project_line(info)">
<div class="grid_${info['offset']}">&nbsp;</div>
<div class="grid_${info['length']} project">${info['project'].name}</div>
% if info.has_key('end'):
<div class="grid_${info['end']}">&nbsp;</div>
% endif
<div class="clear"></div>
</%def>

<%def name="system_status(system)">
<%
  status = system.get_status()
%>
<span 
% if status == 'OK':
style="color:green">
% elif status == 'FAILURE':
style="color:red">
% else:
style="color:yellow">
%endif
${status}</span>
</%def>

<%def name="new_task_dialog()">
<%
  from models import Person
  people = Person.all()
%>
<div id="new-task-dlg">
 <h2>Add New Task</h2>
 <label>Is milestone?</label>
 <select id="new-task-milestone">
   <option value="True">Yes</option>
   <option value="False" selected="selected">No</option>
 </select>
 <br/>
 <label>Start date</label>
 <input type="text" id="new-task-start"  />
 <br />
 <label>Estimated completion</label>
 <input type="text" id="new-task-completed-on" />
 <br />
 <label>Description</label><br/>
 <textarea name="new-task-desc" id="new-task-desc" rows="4" cols="40"></textarea>
 <br/>
 <label>Assignees</label>
 <select size="4" id="new-task-assignees" multiple="multiple">
 % for person in people:
  <option value="${person.key()}">${person.given} ${person.family}</option>
 % endfor
 </select>
 <br/>
 <button onclick="AddTask()">Save</button>
 <button onclick="$('#new-task-dlg').dialog('close')">Close</button>
</div>
</%def>
